Skip to content

feat: implement loan credit scoring pipeline#46

Merged
EmeditWeb merged 1 commit into
StepFi-app:mainfrom
ritik4ever:main
Jun 17, 2026
Merged

feat: implement loan credit scoring pipeline#46
EmeditWeb merged 1 commit into
StepFi-app:mainfrom
ritik4ever:main

Conversation

@ritik4ever

Copy link
Copy Markdown
Contributor

Implements the loan credit scoring pipeline for automated credit assessment.

Changes

  • New src/modules/credit-scoring/ module with rule-based scoring engine
  • POST /loans/:id/assess endpoint to run/re-run assessment on a loan
  • Auto-assessment on loan creation: qualified borrowers get auto-approved, unqualified are auto-rejected, edge cases flagged for manual review
  • New statuses: under_review (manual review needed), rejected (declined)
  • Scoring criteria: reputation score, credit utilization, loan-to-credit ratio
  • Supabase migration documenting new status values
  • 16 unit tests for scoring logic + updated loan service/controller tests

Acceptance Criteria

  • Assessment runs automatically on loan creation
  • Auto-approve works for qualified borrowers (score >= 75, low utilization)
  • Auto-reject works for unqualified applications (score < 60 or over limit)
  • Manual review flagged for edge cases (bronze tier, high utilization, large loans)
  • npm run build passes
  • No any types
  • Unit tests for scoring logic

Closes #31

- Create credit-scoring module with auto-approve/auto-reject/manual review rules
- Add POST /loans/:id/assess endpoint
- Integrate auto-assessment on loan creation
- Add under_review and rejected loan statuses
- Update tests for scoring logic

Closes StepFi-app#31
@EmeditWeb EmeditWeb merged commit aa85b92 into StepFi-app:main Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: implement loan credit scoring pipeline

2 participants